package com.xms.web.view;

import com.xms.core.annotation.AllowAnonymous;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * <p>
 * HomeController
 * </p>
 *
 * @author migo
 * @since 2021/9/11
 */
@Controller
public class HomeController {

    @GetMapping({"", "/{org}", "/{org}/home/index", "/{org}/home", "/{org}/index"})
    public String index(){
        return "index";
    }

    @AllowAnonymous
    @GetMapping("swagger-ui.html")
    public String swaggerui() {
        return "/META-INF/resources/swagger-ui.html";
    }

    @AllowAnonymous
    @GetMapping("unauthorized")
    public String unauthorized(){
        return "common/unauthorized";
    }

    @AllowAnonymous
    @GetMapping("notfound")
    public String notfound(){
        return "common/notfound";
    }

    @AllowAnonymous
    @GetMapping("error")
    public String error(){
        return "common/error";
    }
}
